// ICON.ts
import { createVNode } from 'vue'
import * as $Icon from '@ant-design/icons-vue'
import { StyleType } from './types'

export const Icon = (props: { icon: string; style?: StyleType }) => {
  const { icon, style } = props
  return createVNode($Icon[icon as keyof typeof $Icon], { style: style })
}
